#pragma once

#include "framework.h"
#include "vbm.h"

class ch03_instancing : public RenderTest
{
public:
	bool Init(const EngineDesc &desc) final;
	void BeginFrame() final;
	void EngFrame() final;
	void Destroy() final;
private:
	// Member variables
	float aspect;
	GLuint update_prog;
	GLuint vao[2];
	GLuint vbo[2];
	GLuint xfb;

	GLuint weight_vbo;
	GLuint color_vbo;
	GLuint render_prog;
	GLint render_model_matrix_loc;
	GLint render_projection_matrix_loc;

	GLuint geometry_tex;

	GLuint geometry_xfb;
	GLuint particle_xfb;

	GLint model_matrix_loc;
	GLint projection_matrix_loc;
	GLint triangle_count_loc;
	GLint time_step_loc;

	VBObject object;
};